//
//  USWaveformView.h
//  us
//
//  Created by karry on 2025/4/12.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface USWaveformView : UIView

@property (nonatomic, strong) NSArray<NSNumber *> *volumes;   // 音量数组 0~1
@property (nonatomic, assign) CGFloat barWidth;               // 条宽
@property (nonatomic, assign) CGFloat spacing;                // 条间距
@property (nonatomic, assign) CGFloat barCornerRadius;        // 圆角
@property (nonatomic, strong) UIColor *barColor;              // 默认颜色

@property (nonatomic, assign) NSInteger playingIndex;         // 当前播放的条
@property (nonatomic, strong) UIColor *playingColor;          // 播放颜色

- (void)startPlayingAnimationWithDuration:(NSTimeInterval)duration;
- (void)stopPlayingAnimation;

@end

NS_ASSUME_NONNULL_END
